package com.zzk.protect.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 
 * @TableName invoice
 */
@TableName(value ="invoice")
public class Invoice {
    /**
     * Primary key ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * invoice number
     */
    @TableField(value = "number")
    private String number;

    /**
     * invoice amount
     */
    @TableField(value = "amount")
    private BigDecimal amount;

    /**
     * Status (1=normal, 2=canceled)
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * Payment/refund time
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * Cashier ID
     */
    @TableField(value = "user_id")
    private Integer userId;

    /**
     * Registration ID
     */
    @TableField(value = "registration_id")
    private Integer registrationId;

    /**
     * Payment method
     */
    @TableField(value = "payment_type")
    private Integer paymentType;

    /**
     * Reversed invoice number
     */
    @TableField(value = "reversed_invoice")
    private String reversedInvoice;

    /**
     * Daily status (0=pending, 1=submitted, 2=verified)
     */
    @TableField(value = "daily_status")
    private Integer dailyStatus;

    /**
     * Primary key ID
     */
    public Integer getId() {
        return id;
    }

    /**
     * Primary key ID
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * invoice number
     */
    public String getNumber() {
        return number;
    }

    /**
     * invoice number
     */
    public void setNumber(String number) {
        this.number = number;
    }

    /**
     * invoice amount
     */
    public BigDecimal getAmount() {
        return amount;
    }

    /**
     * invoice amount
     */
    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    /**
     * Status (1=normal, 2=canceled)
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * Status (1=normal, 2=canceled)
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * Payment/refund time
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * Payment/refund time
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * Cashier ID
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * Cashier ID
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /**
     * Registration ID
     */
    public Integer getRegistrationId() {
        return registrationId;
    }

    /**
     * Registration ID
     */
    public void setRegistrationId(Integer registrationId) {
        this.registrationId = registrationId;
    }

    /**
     * Payment method
     */
    public Integer getPaymentType() {
        return paymentType;
    }

    /**
     * Payment method
     */
    public void setPaymentType(Integer paymentType) {
        this.paymentType = paymentType;
    }

    /**
     * Reversed invoice number
     */
    public String getReversedInvoice() {
        return reversedInvoice;
    }

    /**
     * Reversed invoice number
     */
    public void setReversedInvoice(String reversedInvoice) {
        this.reversedInvoice = reversedInvoice;
    }

    /**
     * Daily status (0=pending, 1=submitted, 2=verified)
     */
    public Integer getDailyStatus() {
        return dailyStatus;
    }

    /**
     * Daily status (0=pending, 1=submitted, 2=verified)
     */
    public void setDailyStatus(Integer dailyStatus) {
        this.dailyStatus = dailyStatus;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Invoice other = (Invoice) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getNumber() == null ? other.getNumber() == null : this.getNumber().equals(other.getNumber()))
            && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getRegistrationId() == null ? other.getRegistrationId() == null : this.getRegistrationId().equals(other.getRegistrationId()))
            && (this.getPaymentType() == null ? other.getPaymentType() == null : this.getPaymentType().equals(other.getPaymentType()))
            && (this.getReversedInvoice() == null ? other.getReversedInvoice() == null : this.getReversedInvoice().equals(other.getReversedInvoice()))
            && (this.getDailyStatus() == null ? other.getDailyStatus() == null : this.getDailyStatus().equals(other.getDailyStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getNumber() == null) ? 0 : getNumber().hashCode());
        result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getRegistrationId() == null) ? 0 : getRegistrationId().hashCode());
        result = prime * result + ((getPaymentType() == null) ? 0 : getPaymentType().hashCode());
        result = prime * result + ((getReversedInvoice() == null) ? 0 : getReversedInvoice().hashCode());
        result = prime * result + ((getDailyStatus() == null) ? 0 : getDailyStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", number=").append(number);
        sb.append(", amount=").append(amount);
        sb.append(", status=").append(status);
        sb.append(", createTime=").append(createTime);
        sb.append(", userId=").append(userId);
        sb.append(", registrationId=").append(registrationId);
        sb.append(", paymentType=").append(paymentType);
        sb.append(", reversedInvoice=").append(reversedInvoice);
        sb.append(", dailyStatus=").append(dailyStatus);
        sb.append("]");
        return sb.toString();
    }
}